package com.fary.clazz;

import com.fary.clazz.test.A;
import com.fary.clazz.test.B;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.util.ClassUtils;

import java.lang.reflect.Method;
import java.util.Set;

/**
 * @author Fary
 * @version 1.0
 * @description: TODO
 * @date 2022/3/11 15:37
 */
public class TestClass {
    public static void main(String[] args) throws NoSuchMethodException {
        Set<Class<?>> allInterfacesForClassAsSet = ClassUtils.getAllInterfacesForClassAsSet(A.class);
        Method a = B.class.getDeclaredMethod("a");
        Fary fary = AnnotatedElementUtils.findMergedAnnotation(a, Fary.class);
        System.out.println();
    }
}
